home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
M2
/
NUMBERCO.DEF
< prev
next >
Wrap
Text File
|
2000-09-26
|
2KB
|
54 lines
DEFINITION MODULE NumberConversion;
(* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *)
(*
procedures to convert integer/cardinal/longint/longcard numbers
to string format and back.
*)
CONST
MaxBase = 16;
TYPE
BASE = [2..MaxBase];
PROCEDURE StringToCard( str :ARRAY OF CHAR;
VAR num :CARDINAL; VAR done :BOOLEAN );
PROCEDURE StringToInt( str :ARRAY OF CHAR;
VAR num :INTEGER; VAR done :BOOLEAN );
PROCEDURE StringToNum( str :ARRAY OF CHAR; base :BASE;
VAR num :CARDINAL; VAR done :BOOLEAN );
PROCEDURE CardToString( num :CARDINAL;
VAR str :ARRAY OF CHAR; width :CARDINAL );
PROCEDURE IntToString( num :INTEGER;
VAR str :ARRAY OF CHAR; width :CARDINAL );
PROCEDURE NumToString( num :CARDINAL; base :BASE;
VAR str :ARRAY OF CHAR; width :CARDINAL );
PROCEDURE StringToLongCard( str :ARRAY OF CHAR;
VAR num :LONGCARD; VAR done :BOOLEAN );
PROCEDURE StringToLongInt( str :ARRAY OF CHAR;
VAR num :LONGINT; VAR done :BOOLEAN );
PROCEDURE StringToLongNum( str :ARRAY OF CHAR; base :BASE;
VAR num :LONGCARD; VAR done :BOOLEAN );
PROCEDURE LongCardToString( num :LONGCARD;
VAR str :ARRAY OF CHAR; width :CARDINAL );
PROCEDURE LongIntToString( num :LONGINT;
VAR str :ARRAY OF CHAR; width :CARDINAL );
PROCEDURE LongNumToString( num :LONGCARD; base :BASE;
VAR str :ARRAY OF CHAR; width :CARDINAL );
END NumberConversion.